package com.yuanfeng.base.controller;

import com.yuanfeng.commoms.util.ResponseResult;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @ClassName BaseSystemMessageController
 * @Description 系统消息
 * @Author liulh
 * @Date 2023/7/19 16:04
 * @Version 1.0
 **/
@RestController
@RequestMapping("base/systemMessage")
public class BaseSystemMessageController extends BaseController {

    /**
     * 查询下单消息
     *
     * @param map
     * @return
     */
    @PostMapping("/query/sysOrderNews")
    public ResponseResult querySysOrderNews(@RequestBody Map<String, Object> map) {
        return baseSystemMessageService.querySysOrderNews(map);
    }

    /**
     * 设置已读订单消息
     *
     * @param map
     * @return
     */
    @PostMapping("/read/sysOrderNews")
    public ResponseResult readSysOrderNews(@RequestBody Map<Object, Object> map) {
        return baseSystemMessageService.readSysOrderNews(map);
    }

    /**
     * 删除系统下单消息(伪删除)
     *
     * @param map
     * @return
     */
    @PostMapping("/delete/sysOrderNews")
    public ResponseResult deleteSysOrderNews(@RequestBody Map<Object, Object> map) {
        return baseSystemMessageService.deleteSysOrderNews(map);
    }
}
